package messages;

public class WhoIsMessage extends Message {
	
	private String username;
	private String password; 
	
	
	public WhoIsMessage(){
		super("Whois");
		this.username = "";
	}

	public WhoIsMessage(String username) {
		super("whois");
		this.username = username;
	}

	public String getUsername(){
		return this.username;
	}
	
	public void setUsername(String username){
		this.username = username;
	}
		

	// return an XML-formatted version of the message
	public String toXML()
	{
		String message = "<message>";
        message += "<type>Whois</type>";
        message += "<user><username>" + username + "</username></user>";
        message += "</message>";
        
        return message;
	}

}
